﻿<phone:PhoneApplicationPage x:Class="WinSource.Views.AboutPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:Controls="clr-namespace:WinSource.Controls"
                            DataContext="{Binding AboutViewModel, Source={StaticResource Locator}}"
                            mc:Ignorable="d"
                            d:DesignHeight="800"
                            d:DesignWidth="480">
    
    <phone:PhoneApplicationPage.Resources>

        <Style x:Key="GridStyle"
         TargetType="Grid">
            <Setter Property="Background"
            Value="{StaticResource BackgroundColor}" />
        </Style>
        
        <Style x:Key="TitleControlStyle"
         TargetType="Controls:TitleControl">
            <Setter Property="Background"
            Value="Black" />
            <Setter Property="TitleName"
            Value="{StaticResource ApplicationName}" />
        </Style>
        
        

    </phone:PhoneApplicationPage.Resources>

  <Grid Style="{StaticResource GridStyle}">

    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <Controls:TitleControl Style="{StaticResource TitleControlStyle}"
                           PageName="about" />

    <Canvas Grid.Row="1"
            Margin="24,0,24,81">

      <Image Source="/Assets/Views/About/Logo.png"
             Stretch="Fill"
             Margin="0,32,0,395"
             Width="432" />

      <StackPanel Canvas.Top="200"
                  HorizontalAlignment="Center"
                  Width="440">

        <TextBlock Foreground="Black"
                   Style="{StaticResource TextBlockSubTitleStyle}"
                   Text="Developer"
                   TextAlignment="Center" />

        <TextBlock Style="{StaticResource TextBlockSubTitleStyle}"
                   Text="Sébastien Lachance"
                   TextAlignment="Center" />

                <TextBlock Foreground="Black"
                   Margin="0,15,0,0"
                   Style="{StaticResource TextBlockSubTitleStyle}"
                   Text="Publisher"
                   TextAlignment="Center" />

                <TextBlock Style="{StaticResource TextBlockSubTitleStyle}"
                   Text="DotNetApp"
                   TextAlignment="Center" />

                <TextBlock Foreground="Black"
                   Margin="0,15,0,0"
                   Style="{StaticResource TextBlockSubTitleStyle}"
                   Text="Version"
                   TextAlignment="Center"
                   TextWrapping="Wrap"/>

        <TextBlock Style="{StaticResource TextBlockSubTitleStyle}"
                   Text="1.0"
                   TextAlignment="Center"
                   x:Name="TextBlockVersion" />

      </StackPanel>


    </Canvas>

    <StackPanel Grid.Row="2"
                Margin="0,460,0,0"
                HorizontalAlignment="Center"
                Orientation="Horizontal">

      <Button Command="{Binding WriteReviewCommand}"
              Content="Write Review"
              Style="{StaticResource ButtonStyle}"
              Width="226" />

      <Button Command="{Binding WriteEmailCommand}"
              Content="Email"
              Style="{StaticResource ButtonStyle}"
              Width="226" />

    </StackPanel>

  </Grid>

</phone:PhoneApplicationPage>